<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="{{ url_for('static', filename= 'css/style.css') }}">
    <title>个人博客</title>
</head>
<body>
    {% extends "base.html" %}
    {%block content%}
    <h2>{% block title%} 欢迎来到个人博客{% endblock %}</h2>
    {% for post in posts %}
    <a href="{{url_for('post',post_id=post['id'])}}">
        <h2>
            {{post['title']}}
        </h2>
    </a>
    <span class="badge badge-primary">{{post['created']}}</span>
    <a href="{{ url_for('edit', id=post['id']) }}">
        <span class="badge badge-warning">编辑</span>
    </a>
    <hr>

    {% endfor %}
    {%endblock%}

</body>
</html>